package com.example.module_vip.vip


import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.flow.flowOn
import javax.inject.Inject

class VipRePo @Inject constructor() {
    @Inject
    @VipNetMoudle.CommonVipApi
    lateinit var vipApi: VipApi

    fun getappointmentslist() =
        flow {
            emit(vipApi.getappointmentslist())
        }.flowOn(Dispatchers.IO)

    //创建预约
    fun createappointment(body: AppointmentsListItem) =
        flow {
            emit(vipApi.createappointment(body))
        }.flowOn(Dispatchers.IO)
}